<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>订单详情</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 20px;
            background-color: #f5f5f5;
        }
        .container {
            max-width: 800px;
            margin: 0 auto;
            background-color: white;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
        h1 {
            color: #333;
        }
        .order-info {
            margin-bottom: 30px;
        }
        .info-item {
            margin-bottom: 10px;
        }
        .info-label {
            font-weight: bold;
            display: inline-block;
            width: 100px;
        }
        .back-link {
            display: inline-block;
            margin-top: 20px;
            color: #4CAF50;
            text-decoration: none;
        }
        .back-link:hover {
            text-decoration: underline;
        }
        .button-group {
            margin-top: 20px;
        }
        .button-group a {
            display: inline-block;
            margin-right: 10px;
            padding: 8px 15px;
            background-color: #4CAF50;
            color: white;
            text-decoration: none;
            border-radius: 4px;
        }
        .button-group a:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>订单详情</h1>
        
        <div class="order-info">
            <div class="info-item">
                <span class="info-label">订单ID:</span>
                <span>${order.orderId}</span>
            </div>
            <div class="info-item">
                <span class="info-label">客户ID:</span>
                <span>${order.customerId}</span>
            </div>
            <div class="info-item">
                <span class="info-label">订单日期:</span>
                <span><fmt:formatDate value="${order.orderDate}" pattern="yyyy-MM-dd"/></span>
            </div>
            <div class="info-item">
                <span class="info-label">总金额:</span>
                <span>${order.totalAmount}</span>
            </div>
            <div class="info-item">
                <span class="info-label">状态:</span>
                <span>${order.status}</span>
            </div>
        </div>
        
        <div class="button-group">
            <a href="<c:url value='/customer/detail/${order.customerId}'/>">查看客户详情</a>
            <a href="<c:url value='/order/customer/${order.customerId}'/>">查看该客户所有订单</a>
        </div>
        
        <a href="javascript:history.back()" class="back-link">返回上一页</a>
    </div>
</body>
</html>
